#pragma once

#include "Base.h"
#include "Temp Struct Area.h"
#include "XY.hpp"
#include "Health.hpp"
#include "Defines.h"

class Block : Base
{
private:
	Health m_Health;
	XY m_CurrentPos;
	XY m_MovingToPos;
	bool Moving;
	bool BeingAffected;
public:
	Block():Base(),
		m_CurrentPos(0,0),
		m_MovingToPos(0,0),
		Moving(false),
		BeingAffected(false),
		m_Health()
	{
	}

	Block(int x,int y):Base(),
		m_CurrentPos(x,y),
		m_MovingToPos(x,y),
		Moving(false),
		BeingAffected(false),
		m_Health()
	{}

	Block(int x,int y,int Type):Base(Type),
		m_CurrentPos(x,y),
		m_MovingToPos(x,y),
		Moving(false),
		BeingAffected(false),
		m_Health()
	{}

	~Block(){}

	int GetTypeFlag(){return m_Type;}

	void Place(XY Pos);
	void Destroy();
	void Update();
	bool Move();
	void Drop();
	void SetNewDestination(XY NewPos);
};